from google.appengine.ext import db
from google.appengine.api import users

class AppUser(db.Model):
	user = db.UserProperty()
	shortname = db.StringProperty()
	added = db.DateTimeProperty(auto_now_add=True)

class Bookmark(db.Model):
	app_user = db.ReferenceProperty(AppUser)
	name = db.StringProperty(required=True)
	url = db.LinkProperty(required=True)
		
	added = db.DateTimeProperty(auto_now_add=True)
	last_hit = db.DateTimeProperty(auto_now=True)
	hits = db.IntegerProperty(default=0)